%-- 03.05.2024 14:10 --%
clear
clc
V   = 1 ;                                   % a) TF-model
T1  = 0.01 ;
pt1 =  tf(V,[T1 1])
Ti  = 0.1 ;                                 % b) ZPK-model
int = zpk([],0,1/Ti)
Vr  = 2 ;                                   % c) SS-model
Tr  = 0.005 ;
reg = ss([-1/Tr],[Vr/Tr],[1],0)
% reg = tf([Vr/Tr],[1 1/Tr])                % TF-model alternatively
clc
plant = pt1 * int
plant = series(int,pt1)
forward = plant *reg
clc
pre = 1
pre = tf(1)
pre = tf(1,1)
mess = tf(1)
clc
who
doc feedback
sys = feedback(forward,mess)
clc
sys = tf ( feedback(forward,mess) )
forward
mess
clc
sys = feedback(tf(forward),mess)
step(plan, forward,sys)
step(plant, forward,sys)
legend('plant', 'forward','sys')
clc
plant
dcgain(plant)
reg
tf(reg)
forward
tf(forward)
dcgain(forward)
dcgain(sys)
sys
mess = tf(1,[Tm 1])
Tm = .01
mess = tf(1,[Tm 1])
clc
sys2 = tf ( feedback(forward,mess) )
step(sys,sys2) , legend('sys','sys2')
mess = tf(1,[0.001 1])
sys3 = tf ( feedback(forward,mess) )
hold on
step(sys3) , legend('sys','sys2','sys3')
